/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 21 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "FleetFormationWXGUI.h"

///////////////////////////////////////////////////////////////////////////

MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize );
	
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );
	
	SetToFormationButton = new wxButton( this, wxID_ANY, wxT("Set to formation"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( SetToFormationButton, 0, wxALL, 5 );
	
	FollowFleetButton = new wxToggleButton( this, wxID_ANY, wxT("Follow fleet"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( FollowFleetButton, 0, wxALL, 5 );
	
	wxBoxSizer* bSizer3;
	bSizer3 = new wxBoxSizer( wxVERTICAL );
	
	m_radioBtn_StaticFormation = new wxRadioButton( this, wxID_ANY, wxT("Static formation"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
	bSizer3->Add( m_radioBtn_StaticFormation, 0, wxALL, 5 );
	
	m_radioBtn_RelativeFormation = new wxRadioButton( this, wxID_ANY, wxT("Relative to master heading"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer3->Add( m_radioBtn_RelativeFormation, 0, wxALL, 5 );
	
	bSizer2->Add( bSizer3, 1, wxEXPAND, 5 );
	
	m_toggleBtn2 = new wxToggleButton( this, wxID_ANY, wxT("Show real positions relative to master"), wxDefaultPosition, wxDefaultSize, 0 );
	bSizer2->Add( m_toggleBtn2, 0, wxALL, 5 );
	
	bSizer1->Add( bSizer2, 1, wxEXPAND, 5 );
	
	m_panel1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 800,600 ), wxTAB_TRAVERSAL );
	m_panel1->SetMinSize( wxSize( 800,600 ) );
	
	bSizer1->Add( m_panel1, 10, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	
	// Connect Events
	SetToFormationButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnSetToFormation ), NULL, this );
	FollowFleetButton->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnFollowFleet ), NULL, this );
	m_radioBtn_StaticFormation->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::StaticFormationButton ), NULL, this );
	m_radioBtn_RelativeFormation->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::RelativeToMasterHeading ), NULL, this );
	m_toggleBtn2->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnShowRealPose ), NULL, this );
}

MainFrame::~MainFrame()
{
	// Disconnect Events
	SetToFormationButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnSetToFormation ), NULL, this );
	FollowFleetButton->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnFollowFleet ), NULL, this );
	m_radioBtn_StaticFormation->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::StaticFormationButton ), NULL, this );
	m_radioBtn_RelativeFormation->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( MainFrame::RelativeToMasterHeading ), NULL, this );
	m_toggleBtn2->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( MainFrame::OnShowRealPose ), NULL, this );
}
